diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 37337d9..ada8228 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -24,8 +24,6 @@
  * @since		Version 1.0
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * CodeIgniter Form Helpers
  *
@@ -43,7 +41,6 @@
  *
  * Creates the opening portion of the form.
  *
- * @access	public
  * @param	string	the URI segments of the form destination
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
@@ -71,15 +68,15 @@
 
 		$form = '<form action="'.$action.'"'._attributes_to_string($attributes, TRUE).">\n";
 
-		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites	
-		if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"')))	
+		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites
+		if ($CI->config->item('csrf_protection') === TRUE && ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"')))
 		{
 			$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
 		}
 
-		if (is_array($hidden) AND count($hidden) > 0)
+		if (is_array($hidden) && count($hidden) > 0)
 		{
-			$form .= sprintf("<div style=\"display:none\">%s</div>", form_hidden($hidden));
+			$form .= sprintf('<div style="display:none;">%s</div>', form_hidden($hidden));
 		}
 
 		return $form;
@@ -93,7 +90,6 @@
  *
  * Creates the opening portion of the form, but with "multipart/form-data".
  *
- * @access	public
  * @param	string	the URI segments of the form destination
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
@@ -121,10 +117,9 @@
 /**
  * Hidden Input Field
  *
- * Generates hidden fields.  You can pass a simple key/value string or an associative
- * array with multiple values.
+ * Generates hidden fields. You can pass a simple key/value string or
+ * an associative array with multiple values.
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @return	string
@@ -157,7 +152,7 @@
 		{
 			foreach ($value as $k => $v)
 			{
-				$k = (is_int($k)) ? '' : $k;
+				$k = is_int($k) ? '' : $k;
 				form_hidden($name.'['.$k.']', $v, TRUE);
 			}
 		}
@@ -171,7 +166,6 @@
 /**
  * Text Input Field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -181,7 +175,7 @@
 {
 	function form_input($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'text', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
@@ -194,7 +188,6 @@
  *
  * Identical to the input function but adds the "password" type
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -221,7 +214,6 @@
  *
  * Identical to the input function but adds the "file" type
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -246,7 +238,6 @@
 /**
  * Textarea field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -256,7 +247,7 @@
 {
 	function form_textarea($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '40', 'rows' => '10');
+		$defaults = array('name' => ( ! is_array($data) ? $data : ''), 'cols' => '40', 'rows' => '10');
 
 		if ( ! is_array($data) OR ! isset($data['value']))
 		{
@@ -268,7 +259,7 @@
 			unset($data['value']); // textareas don't use the value attribute
 		}
 
-		$name = (is_array($data)) ? $data['name'] : $data;
+		$name = is_array($data) ? $data['name'] : $data;
 		return '<textarea '._parse_form_attributes($data, $defaults).$extra.'>'.form_prep($val, $name)."</textarea>\n";
 	}
 }
@@ -278,12 +269,11 @@
 /**
  * Multi-select menu
  *
- * @access	public
  * @param	string
  * @param	array
  * @param	mixed
  * @param	string
- * @return	type
+ * @return	string
  */
 if ( ! function_exists('form_multiselect'))
 {
@@ -303,7 +293,6 @@
 /**
  * Drop-down Menu
  *
- * @access	public
  * @param	string
  * @param	array
  * @param	string
@@ -314,28 +303,16 @@
 {
 	function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
 	{
-    // If name is really an array then we'll call the function again using the array
-    if (is_array($name) && isset($name['name']))
-    {
-      
-      if ( ! isset($name['options'])) 
-      {
-        $name['options'] = array();
-      }
-      
-      if ( ! isset($name['selected'])) 
-      {
-        $name['selected'] = array();
-      }
-      
-      if ( ! isset($name['extra'])) 
-      {
-        $name['extra'] = '';
-      }
-      
-      return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
-    }
-    
+		// If name is really an array then we'll call the function again using the array
+		if (is_array($name) && isset($name['name']))
+		{
+			isset($name['options']) OR $name['options'] = array();
+			isset($name['selected']) OR $name['selected'] = array();
+			isset($name['extra']) OR $name['extra'] = array();
+
+			return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
+		}
+
 		if ( ! is_array($selected))
 		{
 			$selected = array($selected);
@@ -363,11 +340,11 @@
 
 				foreach ($val as $optgroup_key => $optgroup_val)
 				{
-					$sel = (in_array($optgroup_key, $selected)) ? ' selected="selected"' : '';
+					$sel = in_array($optgroup_key, $selected) ? ' selected="selected"' : '';
 					$form .= '<option value="'.$optgroup_key.'"'.$sel.'>'.(string) $optgroup_val."</option>\n";
 				}
 
-				$form .= '</optgroup>'."\n";
+				$form .= "</optgroup>\n";
 			}
 			else
 			{
@@ -375,9 +352,7 @@
 			}
 		}
 
-		$form .= "</select>\n";
-
-		return $form;
+		return $form."</select>\n";
 	}
 }
 
@@ -386,7 +361,6 @@
 /**
  * Checkbox Field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	bool
@@ -397,9 +371,9 @@
 {
 	function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '')
 	{
-		$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'checkbox', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 
-		if (is_array($data) AND array_key_exists('checked', $data))
+		if (is_array($data) && array_key_exists('checked', $data))
 		{
 			$checked = $data['checked'];
 
@@ -431,7 +405,6 @@
 /**
  * Radio Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	bool
@@ -457,7 +430,6 @@
 /**
  * Submit Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -467,7 +439,7 @@
 {
 	function form_submit($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'submit', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
 }
@@ -477,7 +449,6 @@
 /**
  * Reset Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -487,7 +458,7 @@
 {
 	function form_reset($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'reset', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
 }
@@ -497,7 +468,6 @@
 /**
  * Form Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -507,8 +477,8 @@
 {
 	function form_button($data = '', $content = '', $extra = '')
 	{
-		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'button');
-		if ( is_array($data) AND isset($data['content']))
+		$defaults = array('name' => ( ! is_array($data) ? $data : ''), 'type' => 'button');
+		if (is_array($data) && isset($data['content']))
 		{
 			$content = $data['content'];
 			unset($data['content']); // content is not an attribute
@@ -523,7 +493,6 @@
 /**
  * Form Label Tag
  *
- * @access	public
  * @param	string	The text to appear onscreen
  * @param	string	The id the label applies to
  * @param	string	Additional attributes
@@ -538,10 +507,10 @@
 
 		if ($id != '')
 		{
-			$label .= " for=\"$id\"";
+			$label .= ' for="'.$id.'"';
 		}
 
-		if (is_array($attributes) AND count($attributes) > 0)
+		if (is_array($attributes) && count($attributes) > 0)
 		{
 			foreach ($attributes as $key => $val)
 			{
@@ -549,7 +518,7 @@
 			}
 		}
 
-		return $label .= ">$label_text</label>";
+		return $label.'>'.$label_text.'</label>';
 	}
 }
 
@@ -560,7 +529,6 @@
  * Used to produce <fieldset><legend>text</legend>.  To close fieldset
  * use form_fieldset_close()
  *
- * @access	public
  * @param	string	The legend text
  * @param	string	Additional attributes
  * @return	string
@@ -572,7 +540,7 @@
 		$fieldset = '<fieldset'._attributes_to_string($attributes, FALSE).">\n";
 		if ($legend_text != '')
 		{
-			$fieldset .= "<legend>$legend_text</legend>\n";
+			return $fieldset.'<legend>'.$legend_text."</legend>\n";
 		}
 
 		return $fieldset;
@@ -584,7 +552,6 @@
 /**
  * Fieldset Close Tag
  *
- * @access	public
  * @param	string
  * @return	string
  */
@@ -592,7 +559,7 @@
 {
 	function form_fieldset_close($extra = '')
 	{
-		return "</fieldset>".$extra;
+		return '</fieldset>'.$extra;
 	}
 }
 
@@ -601,7 +568,6 @@
 /**
  * Form Close Tag
  *
- * @access	public
  * @param	string
  * @return	string
  */
@@ -609,7 +575,7 @@
 {
 	function form_close($extra = '')
 	{
-		return "</form>".$extra;
+		return '</form>'.$extra;
 	}
 }
 
@@ -670,10 +636,9 @@
  * Form Value
  *
  * Grabs a value from the POST array for the specified field so you can
- * re-populate an input field or textarea.  If Form Validation
+ * re-populate an input field or textarea. If Form Validation
  * is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @return	mixed
  */
@@ -703,7 +668,6 @@
  * Let's you set the selected value of a <select> menu via data in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -719,7 +683,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' selected="selected"';
 				}
@@ -735,12 +699,9 @@
 					return '';
 				}
 			}
-			else
+			elseif (($field == '' OR $value == '') OR ($field != $value))
 			{
-				if (($field == '' OR $value == '') OR ($field != $value))
-				{
-					return '';
-				}
+				return '';
 			}
 
 			return ' selected="selected"';
@@ -758,7 +719,6 @@
  * Let's you set the selected value of a checkbox via the value in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -774,7 +734,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' checked="checked"';
 				}
@@ -790,12 +750,9 @@
 					return '';
 				}
 			}
-			else
+			elseif (($field == '' OR $value == '') OR ($field != $value))
 			{
-				if (($field == '' OR $value == '') OR ($field != $value))
-				{
-					return '';
-				}
+				return '';
 			}
 
 			return ' checked="checked"';
@@ -813,7 +770,6 @@
  * Let's you set the selected value of a radio field via info in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -829,7 +785,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' checked="checked"';
 				}
@@ -865,10 +821,9 @@
 /**
  * Form Error
  *
- * Returns the error for a specific form field.  This is a helper for the
+ * Returns the error for a specific form field. This is a helper for the
  * form validation class.
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	string
@@ -892,10 +847,9 @@
 /**
  * Validation Error String
  *
- * Returns all the errors associated with a form submission.  This is a helper
+ * Returns all the errors associated with a form submission. This is a helper
  * function for the form validation class.
  *
- * @access	public
  * @param	string
  * @param	string
  * @return	string
@@ -920,7 +874,6 @@
  *
  * Helper function used by some of the form helpers
  *
- * @access	private
  * @param	array
  * @param	array
  * @return	string
@@ -955,7 +908,7 @@
 				$val = form_prep($val, $default['name']);
 			}
 
-			$att .= $key . '="' . $val . '" ';
+			$att .= $key.'="'.$val.'" ';
 		}
 
 		return $att;
@@ -969,7 +922,6 @@
  *
  * Helper function used by some of the form helpers
  *
- * @access	private
  * @param	mixed
  * @param	bool
  * @return	string
@@ -978,14 +930,14 @@
 {
 	function _attributes_to_string($attributes, $formtag = FALSE)
 	{
-		if (is_string($attributes) AND strlen($attributes) > 0)
+		if (is_string($attributes) && strlen($attributes) > 0)
 		{
-			if ($formtag == TRUE AND strpos($attributes, 'method=') === FALSE)
+			if ($formtag == TRUE && strpos($attributes, 'method=') === FALSE)
 			{
 				$attributes .= ' method="post"';
 			}
 
-			if ($formtag == TRUE AND strpos($attributes, 'accept-charset=') === FALSE)
+			if ($formtag == TRUE && strpos($attributes, 'accept-charset=') === FALSE)
 			{
 				$attributes .= ' accept-charset="'.strtolower(config_item('charset')).'"';
 			}
@@ -993,21 +945,21 @@
 			return ' '.$attributes;
 		}
 
-		if (is_object($attributes) AND count($attributes) > 0)
+		if (is_object($attributes) && count($attributes) > 0)
 		{
-			$attributes = (array)$attributes;
+			$attributes = (array) $attributes;
 		}
 
-		if (is_array($attributes) AND ($formtag === TRUE OR count($attributes) > 0))
+		if (is_array($attributes) && ($formtag === TRUE OR count($attributes) > 0))
 		{
 			$atts = '';
 
-			if ( ! isset($attributes['method']) AND $formtag === TRUE)
+			if ( ! isset($attributes['method']) && $formtag === TRUE)
 			{
 				$atts .= ' method="post"';
 			}
 
-			if ( ! isset($attributes['accept-charset']) AND $formtag === TRUE)
+			if ( ! isset($attributes['accept-charset']) && $formtag === TRUE)
 			{
 				$atts .= ' accept-charset="'.strtolower(config_item('charset')).'"';
 			}
@@ -1030,7 +982,6 @@
  * Determines what the form validation class was instantiated as, fetches
  * the object and returns it.
  *
- * @access	private
  * @return	mixed
  */
 if ( ! function_exists('_get_validation_object'))
@@ -1057,4 +1008,4 @@
 }
 
 /* End of file form_helper.php */
-/* Location: ./system/helpers/form_helper.php */
+/* Location: ./system/helpers/form_helper.php */
\ No newline at end of file
